<template>
	<transition name="fade">
		<div class="plugins-alert-box" v-show="visible">
			<div class="plugins-alert-container">
				<div class="alert-box-title">
					{{title}}
				</div>
				<div class="alert-box-message" v-html="message">
				</div>
				<div class="alert-box-btn">
					<button @click="btnClick">确定</button>
				</div>
			</div>
		</div>
	</transition>
</template>

<script>
	export default {
		name: "alertMain",
		data() {
			return {
				visible: false,
				message: '',
				title: '提示'
			}
		},
		methods: {
			btnClick() {
				this.visible = false;
				this.$el.parentNode.removeChild(this.$el);
				this.$destroy();
			}
		}
	}
</script>
